As such an ultraviolet light emitting element, for example, a gallium nitride-based compound semiconductor laser diode including a sapphire substrate has been known (JP H06-283825 A).
In the gallium nitride-based compound semiconductor laser diode, Mg diffused from a Mg-doped p-type AlYGa1−YN layer is absorbed into an undoped AlXGa1−XN layer, thereby inhibiting Mg diffusion. Note that the relationship between X and Y is 0≦X≦Y≦1.